<div class="header">
	<div class="mid-header clearfix ts_header">
		<div class="lineHangTop">
			<span class="leftHead">
				王老师的空间
			</span>
			<input type="text" class="h1-edit" value="王老师的空间" >
			<span class="role">老师</span>
			<span class="opt" >
				<div class="edit_div">
					<a >编辑</a>
				</div>
				<div class="confirm_div">
					<a class="sureBtn">确定</a>
					<a class="cancleBtn">取消</a>
				</div>
			</span>
		</div>
		<div class="bottomLineHeader">
			<span class="titLine" >
				乐观开朗
			</span>
			<input maxlength="140" class="h2-edit" type="text" 
			placeholder="填写个人签名" value="乐观开朗" >
			<span class="opt opt2" >
				<div class="edit_div2">
					<a>编辑</a>
				</div>
				<div class="confirm_div2">
					<a class="sureBtn">确定</a>
					<a class="cancleBtn">取消</a>
				</div>
			</span>
		</div>
	</div>
</div>
<div class="twoNav">
	<div class="midNav clearfix">
		<div class="leftlogo">
			<div class="lineHangTop2">
				<p class="bigList">王老师的空间</p>
				<input type="text" class="h1-edit" value="王老师的空间" >
				<span class="role">老师</span>
				<span class="opt" >
					<div class="edit_div">
						<a >编辑</a>
					</div>
					<div class="confirm_div">
						<a class="sureBtn">确定</a>
						<a class="cancleBtn">取消</a>
					</div>
				</span>
			</div>
			<div class="listTip bottomLineHeader2">
				<p class="tipList">乐观开朗</p>
				<input maxlength="140" class="h2-edit" type="text" 
				placeholder="填写个人签名" value="乐观开朗" >
				<span class="opt opt2" >
					<div class="edit_div2">
						<a>编辑</a>
					</div>
					<div class="confirm_div2">
						<a class="sureBtn">确定</a>
						<a class="cancleBtn">取消</a>
					</div>
				</span>
			</div>
		</div>
		<ul class="rightShow clearfix">
			<!--[if $numSpace == '1']-->
				<li class="act"><a href="./tesachSpace.html">工作空间</a></li>
			<!--[else]-->
				<li><a href="./tesachSpace.html">工作空间</a></li>
			<!--[/if]-->
			<!--[if $numSpace == '2']-->
				<li class="act"><a href="allSpace.html">展示主页</a></li>
			<!--[else]-->
				<li ><a href="allSpace.html">展示主页</a></li>
			<!--[/if]-->
			<!--[if $numSpace == '3']-->
				<li class="act"><a href="article.html">文章</a></li>
			<!--[else]-->
				<li ><a href="article.html">文章</a></li>
			<!--[/if]-->

			<!--[if $numSpace == '4']-->
				<li class="act"><a href="resource.html">资源</a></li>
			<!--[else]-->
				<li ><a href="resource.html">资源</a></li>
			<!--[/if]-->

			<!--[if $numSpace == '5']-->
				<li class="act"><a href="Album.html">相册</a></li>
			<!--[else]-->
				<li ><a href="Album.html">相册</a></li>
			<!--[/if]-->

			<!--[if $numSpace == '6']-->
				<li class="act"><a href="mailLIst.html">通讯录</a></li>
			<!--[else]-->
				<li ><a href="mailLIst.html">通讯录</a></li>
			<!--[/if]-->
		</ul>
	</div>
</div>
<div class="toTop">
	<a href="javascript:void(0)">
		返回顶部
	</a>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
	$(".trigle").on("click",function(){
		if($(this).siblings(".showHide").hasClass("show")){
			$(this).siblings(".showHide").removeClass("show");
		}else{
			$(this).siblings(".showHide").addClass("show");
		}
	});

	$(".toTop a").on("click",function(){
		$("html,body").animate({scrollTop:0});
	}); 
	/******************************空间签名修改 start*************************************************/
	var hoverFlag = false;
	$(".mid-header .lineHangTop").hover(function(){
		if(hoverFlag){
			return false;
		};
		$(".edit_div").css("display","block");
		$(".edit_div a").css("display","inline-block");
	},function(){
		$(".edit_div").css("display","block");
		$(".edit_div a").css("display","none");
	});

	$(".edit_div a").on("click",function(){
			$(this).css("display","none");
		var siblingDev =$(this).parent(".edit_div").siblings(".confirm_div");
			if(siblingDev.css("display") == "none" ){
				hoverFlag = true;
				siblingDev.css("display","block");
				$(".h1-edit").css("display","inline-block");
				$(".leftHead").css("display","none");
			}
	});
	$(".confirm_div .sureBtn").on("click",function(){
		hoverFlag = false;
		/*ajax请求之后操作demo2222222*/
		document.title=$(".h1-edit").val();
		$(".leftHead").text($(".h1-edit").val());
		$(".h1-edit").css("display","none");
		$(".leftHead").css("display","block");
		$(this).parent(".confirm_div").css("display","none");
		$(".edit_div a").css("display","block");
	});
	$(".confirm_div .cancleBtn").on("click",function(){
		hoverFlag = false;
		$(".h1-edit").css("display","none");
		$(".leftHead").css("display","block");
		$(this).parent(".confirm_div").css("display","none");
		$(".edit_div a").css("display","block");
	});

	/* smallLine click*/
	var twoFlag = false;
	$(" .mid-header .bottomLineHeader").hover(function(){
		if(twoFlag){
			return false;
		};
		$(".edit_div2").css("display","block");
		$(".edit_div2 a").css("display","inline-block");
	},function(){
		$(".edit_div2").css("display","block");
		$(".edit_div2 a").css("display","none");
	});

	$(".edit_div2 a").on("click",function(){
			$(this).css("display","none");
		var siblingDev =$(this).parent(".edit_div2").siblings(".confirm_div2");
			if(siblingDev.css("display") == "none" ){
				twoFlag = true;
				siblingDev.css("display","block");
				$(".h2-edit").css("display","inline-block");
				 $(".bottomLineHeader .titLine").css("display","none");
			}
	});
	$(".confirm_div2 .sureBtn").on("click",function(){
		twoFlag = false;
		/*ajax请求之后操作demo2222222*/
		$(".bottomLineHeader .titLine").text($(".h2-edit").val());
		$(".h2-edit").css("display","none");
		$(".bottomLineHeader  .titLine").css("display","inline-block");
		$(this).parent(".confirm_div2").css("display","none");
		$(".edit_div2 a").css("display","block");
	});
	$(".confirm_div2 .cancleBtn").on("click",function(){
		hoverFlag = false;
		$(".h2-edit").css("display","none");
		$(".bottomLineHeader  .titLine").css("display","inline-block");
		$(this).parent(".confirm_div2").css("display","none");
		$(".edit_div2 a").css("display","block");
	});


	/******************************空间签名修改 end*************************************************/
</script>